package org.crazyit.cloud;

import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.cloud.stream.annotation.EnableBinding;
import org.springframework.cloud.stream.annotation.StreamListener;
import org.springframework.cloud.stream.messaging.Sink;
import org.springframework.cloud.stream.messaging.Source;

@SpringBootApplication
@EnableBinding(value = {ReceiveService.class})
public class SecondApplication {
	
	public static void main(String[] args) {
		SpringApplication.run(SecondApplication.class, args);
	}

	@StreamListener("myInput")
	public void receive(byte[] msg) {
		System.out.println("Second Consumer 接收到的消息：  " + new String(msg));
	}

}
